<?php
/**
**百度直达号推送产品
**Date 2015-11-13 
**Time pm 16:00
**User by pzp
**/
include('/var/www/html/new/d/module/api/bd_zhidahao/baidu_zdh.class.php');
$BD_zdh = new BD_zdh();

$provider_no = $_REQUEST['partnerId'];
$signkeys = explode("|",$_REQUEST['signkey']);
$sp_no = $signkeys[0];
$secret_key = $signkeys[1];
$partnerDealId = $_REQUEST['partnerDealId'];

if($partnerDealId)
$post_goods = $BD_zdh->Post_bd_Product($partnerDealId,$sp_no);

$msg = json_encode($post_goods);
$rtime = time();
$sign32 = $BD_zdh->sign32($provider_no,$msg,$rtime,$secret_key);

$Product_data = array(
	'provider_no'	=> $provider_no,
	'msg'			=> $msg,
	'time'			=> $rtime,
	'sign32'		=> $sign32
); 

$Product_post = $BD_zdh->bd_zhida_post($Product_data);
$BD_zdh->logfile(json_encode($_REQUEST).'|'.json_encode($Product_data).'|'.json_encode($Product_post),'pushGoods');
?>